<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateSuggestionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('suggestions', function (Blueprint $table) {
            $table->increments('id');
            $table->bigInteger('user_id')->default(0)->comment('用户id');
            $table->string('user_name', 64)->default('')->comment('姓名');
            $table->string('tel')->default('')->comment('固话');
            $table->string('email')->default('')->comment('邮箱');
            $table->string('address')->default('')->comment('联系地址');
            $table->text('content')->comment('反馈内容');
            $table->string('ip', 60)->default('')->comment('IP地址');
            $table->boolean('state')->default(0)->comment('狀態 -1=已忽略  0=待處理  1=跟蹤中  2=已處理');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('suggestions');
    }
}
